package benchmarks.tpch.mysql;

import api.Configuration;
import benchmarks.tpch.TPCHQuery;
import benchmarks.tpch.TPCHWorker;
import benchmarks.tpch.mysql.queries.*;

public class TPCHWorkerMySQL extends TPCHWorker {
    public TPCHWorkerMySQL(Configuration config) {
        super(config);
    }

    public TPCHQuery makeQueryImpl(String queryName) {
        if (queryName.equals("Q1")) {
            return new Q1MySQL();
        }
        else if (queryName.equals("Q8")){
            return new Q8MySQL();
        }
        else if (queryName.equals("Q15")){
            return new Q15MySQL();
        }
        else if (queryName.equals("Q20")){
            return new Q20MySQL();
        }
        else if (queryName.equals("Q21")){
            return new Q21MySQL();
        }
        else if (queryName.equals("Q22")){
            return new Q22MySQL();
        } else {
            throw new RuntimeException("Unknown Query of " + queryName);
        }
    }
}
